home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmMain
- BorderStyle = 3 'Fixed Dialog
- Caption = "Live Number Example"
- ClientHeight = 5340
- ClientLeft = 2235
- ClientTop = 2145
- ClientWidth = 5760
- Height = 5745
- Icon = "LNumber.frx":0000
- Left = 2175
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5340
- ScaleWidth = 5760
- Top = 1800
- Width = 5880
- Begin VB.ComboBox cboDigitCount
- Height = 315
- ItemData = "LNumber.frx":08CA
- Left = 180
- List = "LNumber.frx":08DD
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 7
- Top = 2745
- Width = 1455
- End
- Begin VB.Frame Frame1
- Caption = "Live Number Control"
- Height = 4515
- Left = 45
- TabIndex = 0
- Top = 810
- Width = 5685
- Begin VB.CommandButton cmdSample1
- Caption = "Sample &1"
- Height = 375
- Left = 135
- TabIndex = 25
- Top = 4050
- Width = 1275
- End
- Begin VB.ComboBox cboDelay
- Height = 315
- ItemData = "LNumber.frx":08F0
- Left = 2745
- List = "LNumber.frx":0909
- Style = 2 'Dropdown List
- TabIndex = 23
- Top = 1935
- Width = 1050
- End
- Begin VB.CommandButton cmdApply
- Caption = "&Apply"
- Height = 330
- Left = 3825
- TabIndex = 22
- Top = 3240
- Width = 825
- End
- Begin VB.TextBox txtValue
- Height = 330
- Left = 2070
- MaxLength = 5
- TabIndex = 20
- Top = 3240
- Width = 1680
- End
- Begin VB.ComboBox cboFont
- Height = 315
- ItemData = "LNumber.frx":0924
- Left = 135
- List = "LNumber.frx":092B
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 18
- Top = 3240
- Width = 1860
- End
- Begin VB.CheckBox chkDigitsMoveUp
- Caption = "Digits Move &Up"
- Height = 240
- Left = 135
- TabIndex = 17
- Top = 1215
- Value = 1 'Checked
- Width = 1905
- End
- Begin VB.CommandButton cmdExit
- Caption = "E&xit"
- Height = 375
- Left = 4455
- TabIndex = 16
- Top = 4050
- Width = 1140
- End
- Begin VB.CommandButton cmdResetValue
- Caption = "&Reset Value"
- Height = 375
- Left = 4410
- TabIndex = 15
- Top = 180
- Width = 1185
- End
- Begin VB.ComboBox cboSpeed
- Height = 315
- ItemData = "LNumber.frx":093E
- Left = 1665
- List = "LNumber.frx":0951
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 13
- Top = 1935
- Width = 1005
- End
- Begin VB.ComboBox cboTop
- Height = 315
- ItemData = "LNumber.frx":0964
- Left = 1665
- List = "LNumber.frx":097A
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 12
- Top = 2565
- Width = 2130
- End
- Begin VB.ComboBox cboSide
- Height = 315
- ItemData = "LNumber.frx":0990
- Left = 135
- List = "LNumber.frx":09A6
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 10
- Top = 2565
- Width = 1455
- End
- Begin VB.CheckBox chkDigitChanging
- Caption = "Digit C&hanging Sound"
- Height = 240
- Left = 135
- TabIndex = 6
- Top = 900
- Value = 1 'Checked
- Width = 1905
- End
- Begin VB.CheckBox chkDigitChanged
- Caption = "Di&git Changed Sound"
- Height = 240
- Left = 135
- TabIndex = 5
- Top = 585
- Value = 1 'Checked
- Width = 1950
- End
- Begin VB.CommandButton cmdTextColor
- Caption = "&Text Color"
- Height = 375
- Left = 4410
- TabIndex = 4
- Top = 1395
- Width = 1185
- End
- Begin VB.CommandButton cmdDigitColor
- Caption = "&Digit Color"
- Height = 375
- Left = 4410
- TabIndex = 3
- Top = 990
- Width = 1185
- End
- Begin VB.CommandButton cmdBackColor
- Caption = "&Border Color"
- Height = 375
- Left = 4410
- TabIndex = 2
- Top = 585
- Width = 1185
- End
- Begin VB.CheckBox chkCounterActive
- Caption = "&Active"
- Height = 240
- Left = 135
- TabIndex = 1
- Top = 270
- Value = 1 'Checked
- Width = 1590
- End
- Begin VB.Label Label8
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- Caption = "Real Life Sample"
- ForeColor = &H00800000&
- Height = 195
- Left = 135
- TabIndex = 26
- Top = 3825
- Width = 1290
- WordWrap = -1 'True
- End
- Begin VB.Label Label7
- AutoSize = -1 'True
- Caption = "Digit Delay"
- Height = 195
- Left = 2745
- TabIndex = 24
- Top = 1710
- Width = 765
- End
- Begin VB.Label Label6
- AutoSize = -1 'True
- Caption = "Change Value"
- Height = 195
- Left = 2070
- TabIndex = 21
- Top = 3015
- Width = 1005
- End
- Begin VB.Label Label5
- AutoSize = -1 'True
- Caption = "Font"
- Height = 195
- Left = 135
- TabIndex = 19
- Top = 3015
- Width = 315
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "Digit Speed"
- Height = 195
- Left = 1665
- TabIndex = 14
- Top = 1710
- Width = 825
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- Caption = "Digit Top Bottom Margins"
- Height = 195
- Left = 1665
- TabIndex = 11
- Top = 2340
- Width = 1785
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "Digit Side Margins"
- Height = 195
- Left = 135
- TabIndex = 9
- Top = 2340
- Width = 1275
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "Digit Count"
- Height = 195
- Left = 135
- TabIndex = 8
- Top = 1710
- Width = 780
- End
- End
- Begin VB.Timer Timer1
- Interval = 3000
- Left = 5310
- Top = 45
- End
- Begin LiveLabelsLib.LiveNumber LiveNumber1
- Height = 690
- Left = 45
- TabIndex = 27
- Top = 45
- Width = 3075
- _Version = 65536
- _ExtentX = 5424
- _ExtentY = 1217
- _StockProps = 41
- ForeColor = 16777215
- BackColor = 0
- DigitBackColor = 49152
- DigitSpeed = 2
- BeginProperty DigitFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Comic Sans MS"
- Size = 24
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin MSComDlg.CommonDialog dlgMain
- Left = 4770
- Top = 45
- _ExtentX = 847
- _ExtentY = 847
- _Version = 327681
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub cboDelay_Click()
- LiveNumber1.DigitDelay = Val(cboDelay.List(cboDelay.ListIndex))
- End Sub
- Private Sub cboDigitCount_Click()
- LiveNumber1.DigitCount = Val(cboDigitCount.List(cboDigitCount.ListIndex))
- End Sub
- Private Sub cboFont_Click()
- LiveNumber1.DigitFont.Name = cboFont.List(cboFont.ListIndex)
- End Sub
- Private Sub cboSide_Click()
- LiveNumber1.DigitSideMargin = Val(cboSide.List(cboSide.ListIndex))
- End Sub
- Private Sub cboSpeed_Click()
- LiveNumber1.DigitSpeed = Val(cboSpeed.List(cboSpeed.ListIndex))
- End Sub
- Private Sub cboTop_Click()
- LiveNumber1.DigitTopMargin = Val(cboTop.List(cboTop.ListIndex))
- End Sub
- Private Sub chkCounterActive_Click()
- Timer1.Enabled = (chkCounterActive.Value = 1)
- End Sub
- Private Sub chkDigitChanging_Click()
- With LiveNumber1
-
- If (chkDigitChanging.Value = 0) Then
- .DigitChangingSound = ""
- Else
- .DigitChangingSound = App.Path & "\" & "Turn.WAV"
- End If
- End With
- End Sub
- Private Sub chkDigitChanged_Click()
- With LiveNumber1
- If (chkDigitChanged.Value = 0) Then
- .DigitChangedSound = ""
- Else
- .DigitChangedSound = App.Path & "\" & "Tick.WAV"
- End If
- End With
- End Sub
- Private Sub chkDigitsMoveUp_Click()
- LiveNumber1.DigitsMoveUp = (chkDigitsMoveUp.Value = 1)
- End Sub
- Private Sub cmdApply_Click()
- If Trim(txtValue.Text) = "" Then txtValue.Text = "0"
- LiveNumber1.Value = Val(txtValue.Text)
- End Sub
- Private Sub cmdBackColor_Click()
- With dlgMain
- .Action = 3
- If .CancelError Then Exit Sub
- LiveNumber1.BackColor = .Color
- End With
- End Sub
- Private Sub cmdDigitColor_Click()
- With dlgMain
- .Action = 3
- If .CancelError Then Exit Sub
- LiveNumber1.DigitBackColor = .Color
- End With
- End Sub
- Private Sub cmdExit_Click()
- Unload Me
- End Sub
- Private Sub cmdResetValue_Click()
- LiveNumber1.Value = 0
- End Sub
- Private Sub cmdSample1_Click()
- Load frmSample1
- frmSample1.Show vbModal
- End Sub
- Private Sub cmdTextColor_Click()
- With dlgMain
- .Action = 3
- If .CancelError Then Exit Sub
- LiveNumber1.ForeColor = .Color
- End With
- End Sub
- Private Sub Form_Load()
- chkDigitChanged_Click
- chkDigitChanging_Click
- cboFont.ListIndex = 0
- cboDigitCount.ListIndex = 3
- cboSide.ListIndex = 1
- cboTop.ListIndex = 2
- cboSpeed.ListIndex = 0
- cboDelay.ListIndex = 0
- Dim Cnt As Long
- For Cnt = 0 To Screen.FontCount
- cboFont.AddItem Screen.Fonts(Cnt)
- Next
- End Sub
- Private Sub Timer1_Timer()
- LiveNumber1.Add 1
- End Sub
- Private Sub txtValue_KeyPress(KeyAscii As Integer)
- If (KeyAscii = 8 Or (KeyAscii <= Asc("9") And KeyAscii >= Asc("0"))) Then Exit Sub
- KeyAscii = 0
- End Sub
-